#include "st-icon-cache.h"
-#include "gtkdebug.h"
-#include "gtkiconcachevalidator.h"
-
#include <glib/gstdio.h>
#include <gdk-pixbuf/gdk-pixdata.h>
if (cache->ref_count == 0)
{
- GTK_NOTE (ICONTHEME, g_message ("unmapping icon cache"));
+ g_debug ("unmapping icon cache");
if (cache->map)
g_mapped_file_unref (cache->map);
/* Check if we have a cache file */
cache_filename = g_build_filename (path, "icon-theme.cache", NULL);
- GTK_NOTE (ICONTHEME, g_message ("look for icon cache in %s", path));
+ g_debug ("look for icon cache in %s", path);
if (g_stat (path, &path_st) < 0)
goto done;
/* Verify cache is uptodate */
if (st.st_mtime < path_st.st_mtime)
{
- GTK_NOTE (ICONTHEME, g_message ("icon cache outdated"));
+ g_debug ("icon cache outdated");
goto done;
}
if (!map)
goto done;
-#ifdef G_ENABLE_DEBUG
- if (GTK_DEBUG_CHECK (ICONTHEME))
- {
- CacheInfo info;
-
- info.cache = g_mapped_file_get_contents (map);
- info.cache_size = g_mapped_file_get_length (map);
- info.n_directories = 0;
- info.flags = CHECK_OFFSETS|CHECK_STRINGS;
-
- if (!_gtk_icon_cache_validate (&info))
- {
- g_mapped_file_unref (map);
- g_warning ("Icon cache '%s' is invalid", cache_filename);
-
- goto done;
- }
- }
-#endif
-
- GTK_NOTE (ICONTHEME, g_message ("found icon cache for %s", path));
+ g_debug ("found icon cache for %s", path);
cache = g_new0 (GtkIconCache, 1);
cache->ref_count = 1;
if (type != 0)
{
- GTK_NOTE (ICONTHEME, g_message ("invalid pixel data type %u", type));
+ g_debug ("invalid pixel data type %u", type);
return NULL;
}
(guchar *)(cache->buffer + pixel_data_offset + 8),
&error))
{
- GTK_NOTE (ICONTHEME, g_message ("could not deserialize data: %s", error->message));
+ g_debug ("could not deserialize data: %s", error->message);
g_error_free (error);
return NULL;
cache);
if (!pixbuf)
{
- GTK_NOTE (ICONTHEME, g_message ("could not convert pixdata to pixbuf: %s", error->message));
+ g_debug ("could not convert pixdata to pixbuf: %s", error->message);
g_error_free (error);
return NULL;
#include "st-icon-theme.h"
#include "gtkcsspalettevalueprivate.h"
#include "gtkcssrgbavalueprivate.h"
-#include "gtkdebug.h"
#include "deprecated/gtkiconfactory.h"
#include "st-icon-cache.h"
#include "gtkintl.h"
if (!priv->themes_valid)
return;
- GTK_NOTE (ICONTHEME,
- g_message ("change to icon theme \"%s\"", priv->current_theme));
+ g_debug ("change to icon theme \"%s\"", icon_theme->current_theme);
blow_themes (icon_theme);
queue_theme_changed (icon_theme);
g_get_current_time (&tv);
priv->last_stat_time = tv.tv_sec;
-
- GTK_NOTE (ICONTHEME, {
- GList *l;
- GString *s;
- s = g_string_new ("Current icon themes ");
- for (l = icon_theme->priv->themes; l; l = l->next)
- {
- IconTheme *theme = l->data;
- g_string_append (s, theme->name);
- g_string_append_c (s, ' ');
- }
- g_message ("%s", s->str);
- g_string_free (s, TRUE);
- });
}
static void
use_builtin = flags & GTK_ICON_LOOKUP_USE_BUILTIN;
- /* This is used in the icontheme unit test */
- GTK_NOTE (ICONTHEME,
- for (i = 0; icon_names[i]; i++)
- g_message ("\tlookup name: %s", icon_names[i]));
-
/* For symbolic icons, do a search in all registered themes first;
* a theme that inherits them from a parent theme might provide
* an alternative full-color version, but still expect the symbolic icon
g_return_val_if_fail ((flags & GTK_ICON_LOOKUP_NO_SVG) == 0 ||
(flags & GTK_ICON_LOOKUP_FORCE_SVG) == 0, NULL);
- GTK_NOTE (ICONTHEME, g_message ("looking up icon %s", icon_name));
+ g_debug ("looking up icon %s", icon_name);
return gtk_icon_theme_lookup_icon_for_scale (icon_theme, icon_name,
size, 1, flags);
(flags & GTK_ICON_LOOKUP_FORCE_SVG) == 0, NULL);
g_return_val_if_fail (scale >= 1, NULL);
- GTK_NOTE (ICONTHEME, g_message ("looking up icon %s for scale %d", icon_name, scale));
+ g_debug ("looking up icon %s for scale %d", icon_name, scale);
if (flags & GTK_ICON_LOOKUP_GENERIC_FALLBACK)
{
else
suffix = GPOINTER_TO_UINT (g_hash_table_lookup (dir->icons, icon_name));
- GTK_NOTE (ICONTHEME, g_message ("get icon suffix%s: %u", dir->cache ? " (cached)" : "", suffix));
+ g_debug ("get icon suffix%s: %u", dir->cache ? " (cached)" : "", suffix);
return suffix;
}
{
dir = l->data;
- GTK_NOTE (ICONTHEME, g_message ("look up icon dir %s", dir->dir));
+ g_debug ("look up icon dir %s", dir->dir);
suffix = theme_dir_get_icon_suffix (dir, icon_name, NULL);
if (best_suffix (suffix, allow_svg) != ICON_SUFFIX_NONE)
{
GDir *gdir;
const char *name;
- GTK_NOTE (ICONTHEME, g_message ("scanning directory %s", full_dir));
+ g_debug ("scanning directory %s", full_dir);
gdir = g_dir_open (full_dir, 0, NULL);
int i;
char **children;
- GTK_NOTE (ICONTHEME, g_message ("scanning resources %s", full_dir));
+ g_debug ("scanning resources %s", full_dir);
children = g_resources_enumerate_children (full_dir, 0, NULL);
if (!children)
symbolic_size = MAX (icon_info->symbolic_width, icon_info->symbolic_height);
- GTK_NOTE (ICONTHEME,
if (icon_info->dir_type == ICON_THEME_DIR_UNTHEMED)
- g_message ("Symbolic icon %s is not in an icon theme directory",
- icon_info->key.icon_names ? icon_info->key.icon_names[0] : icon_info->filename);
+ g_debug ("Symbolic icon %s is not in an icon theme directory",
+ icon_info->key.icon_names ? icon_info->key.icon_names[0] : icon_info->filename);
else if (icon_info->dir_size * icon_info->dir_scale != symbolic_size)
- g_message ("Symbolic icon %s of size %d is in an icon theme directory of size %d",
- icon_info->key.icon_names ? icon_info->key.icon_names[0] : icon_info->filename,
- symbolic_size,
- icon_info->dir_size * icon_info->dir_scale)
- );
+ g_debug ("Symbolic icon %s of size %d is in an icon theme directory of size %d",
+ icon_info->key.icon_names ? icon_info->key.icon_names[0] : icon_info->filename,
+ symbolic_size,
+ icon_info->dir_size * icon_info->dir_scale)
width = g_strdup_printf ("%d", icon_info->symbolic_width);
height = g_strdup_printf ("%d", icon_info->symbolic_height);